package bb.lanxing.test;

import android.app.TimePickerDialog;
import android.os.Bundle;
import android.widget.Button;
import android.widget.TextView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import bb.lanxing.R;

public class SimpleViewActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_simple_test);
        initView();
    }

    private void initView() {
        Button button = findViewById(R.id.btn_setting);
        TextView tvValue = findViewById(R.id.tv_value);
        button.setOnClickListener(view -> {
            new TimePickerDialog(SimpleViewActivity.this, (view1, hourOfDay, minute) -> {
                tvValue.setText(String.format("%d,%d", hourOfDay, minute));

            }, 0, 0, true).show();
        });
    }
}
